package com.example.gss.Service;

import com.example.gss.entity.ScholarshipApplication;
import com.example.gss.enums.GradeType;

import java.math.BigDecimal;

/**
 * 评分计算服务接口
 */
public interface ScoreCalculationService {
    
    /**
     * 根据年级类型计算综合得分
     */
    BigDecimal calculateTotalScore(ScholarshipApplication application, GradeType gradeType);
    
    /**
     * 验证各单项分数是否超过上限
     */
    boolean validateScoreLimits(ScholarshipApplication application, GradeType gradeType);
    
    /**
     * 获取年级类型的评分规则描述
     */
    String getScoreRuleDescription(GradeType gradeType);
    
    /**
     * 获取各单项分数的上限
     */
    ScoreLimits getScoreLimits(GradeType gradeType);
    
    /**
     * 分数上限类
     */
    class ScoreLimits {
        private final BigDecimal ideologyLimit;
        private final BigDecimal academicLimit;
        private final BigDecimal researchLimit;
        private final BigDecimal serviceLimit;
        
        public ScoreLimits(BigDecimal ideologyLimit, BigDecimal academicLimit, 
                          BigDecimal researchLimit, BigDecimal serviceLimit) {
            this.ideologyLimit = ideologyLimit;
            this.academicLimit = academicLimit;
            this.researchLimit = researchLimit;
            this.serviceLimit = serviceLimit;
        }
        
        public BigDecimal getIdeologyLimit() { return ideologyLimit; }
        public BigDecimal getAcademicLimit() { return academicLimit; }
        public BigDecimal getResearchLimit() { return researchLimit; }
        public BigDecimal getServiceLimit() { return serviceLimit; }
    }
} 